﻿<?php
include "includeFiles.php";
include "page.php";
if(empty($cateid)) $cateid=11110;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="X-UA-Compatible" content="IE=7" />

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $C['Title'];?></title>
<Link href="../uploadfile/ico/<?php echo $C['ICO'];?>" rel="Shortcut Icon">
<meta name="Keywords" content="<?php echo $C['Keywords'];?>">
<meta name="description" content="<?php echo $C['Description'];?>">
<Meta name="Copyright" Content="<?php echo $C['CopyRight'];?>">

<link href="css/reset.css" rel="stylesheet" type="text/css" media="screen" />
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<?php
extract($_POST);
$action=$_POST["action"];


if($action=="edit")
{

	//include("include/UpImage.php");
/*
	if($file!="")
	{
	 $luji="../uploadfile/product/";
	 $PhotoName=UpPhoto($luji,$file);
	}
*/
/* 	echo $sql=" update `hy_member` set 
`user_truename`='$user_truename',
`user_sex`='$user_sex',
`nicheng`='$nicheng',
`user_email`='$user_email',
`user_zipcode`='$user_zipcode',
`user_add`='$user_add',
`user_tel`='$user_tel',
`user_mobile`='$user_mobile',
`user_tel`='$tel',
`user_company`='$user_company',
`user_intro`='$user_intro',
`user_regtime`='$user_regtime' where `user_id`='$user_id'";*/
 $sql=" update `hy_member` set 
`user_zipcode`='$user_zipcode',
`user_add`='$user_add',
`user_sex`='$user_sex',
`user_mobile`='$user_mobile',
`user_tel`='$tel',
`kaihao`='$kaihao',
`shenfenzheng`='$shenfenzheng',
`yhaccout`='$yhaccout',
`user_company`='$user_company',
`user_intro`='$user_intro',
`user_intro` = '$user_intro',
`user_regtime`='$user_regtime' where `user_id`='".$_SESSION["user_id"]."'";

	$result=$objDb->query($sql);
	if($result)
	{
		echo "<script>alert('修改成功。');history.go(-1);</script>";
		exit;
	}
	else
	{
		echo "<script>alert('修改失败，请重试。');history.go(-1);</script>";
		exit;
	}
}


?>
<?php include_once('header.php');?>
<div class="main mid">
      <?php include_once('member_left.php');?>
   <div class="main_right2">
      <div class="main_nav2"><a href="index.php">首页</a> > <a href="account.php">会员中心</a> > 我的资料</div>
      <div class="main_bt2">我的资料</div>
         <div class="main_txt2">
		 <?
		  $sql="select * from hy_member where user_id='".$_SESSION["user_id"]."'";
			$objDb->query($sql);
			$daterow=$objDb->get_data();

		 ?>
		  <form action="" method="post" id="form1" onsubmit="return checkFrm(this)">
                <input name="action" type="hidden" value="edit" />
	  
        <table width="100%" border="0" cellpadding="10" cellspacing="0" class="pro_info" >
		<tr>
            <td width="20%" align="right">邮箱：</td>
            <td width="760"><?=$daterow[0]['user_email']?>
              *</td>
          </tr>
          <tr>
            <td width="20%" align="right">姓名：</td>
            <td width="760"><input name="user_truename" type="text" id="user_truename"  value="<?=$daterow[0]['user_name']?>"/>
              *</td>
          </tr>
          <tr id="CmpProvinceTr3">
            <td align="right">性别：</td>
            <td>
              <span id="china_city3">
                <select onchange="initcity();" name="user_sex" id="user_sex" >
                  <option value="0"  <?php if($daterow[0]['user_sex']==0){echo "selected";}?>>男</option>
                  <option  value="1" <?php if($daterow[0]['user_sex']==1){echo "selected";}?>>女</option>
                </select>
              </span></td>
          </tr>
         
          <tr class="order_table_2">
            <td align="right" valign="top">手机：</td>
            <td align="left"><input name="tel" type="text" class="login_form_1" id="tel" value="<?=$daterow[0]['user_tel']?>" size="60" /></td>
          </tr>


		       <tr class="order_table_2">
            <td align="right"  valign="top">卡号：</td>
             <td align="left"><input name="kaihao" type="text" class="login_form_1" id="kaihao" value="<?php echo $daterow[0]['kaihao'];?>" size="60" /></td>
           </tr>
		   
		     <tr class="order_table_2">
          <td align="right" valign="top">身份证号码：</td>
             <td align="left"><input name="shenfenzheng" type="text" class="login_form_1" id="shenfenzheng" value="<?php echo $daterow[0]['shenfenzheng'];?>" size="60" /></td>
           </tr>
		   
		   <tr class="order_table_2">
            <td align="right" valign="top">银行账号：</td>
             <td align="left"><textarea name="yhaccout" cols="60" rows="5"  id="yhaccout"><?php echo $daterow[0]['yhaccout'];?></textarea></td>
           </tr>
		   


          <tr>
            <td align="right">现居地：</td>
            <td><input name="user_add" type="text" id="user_add"  style="width:350px;" value="<?=$daterow[0]['user_add']?>" />
              &nbsp;</td>
          </tr>
          <tr>
            <td align="right" valign="top">自我介绍：</td>
            <td valign="top"><textarea name="user_intro" id="user_intro" cols="70" rows="5"><?=$daterow[0]['user_intro']?></textarea></td>
          </tr>
          <tr>
            <td align="right" valign="top">&nbsp;</td>
            <td valign="top"><span style="padding-top:20px; padding-bottom:20px;">
              <input type="submit" class="btn" value="修改资料"  name="Submit" border="0" />
            </span></td>
          </tr>
        </table>
		</form>
         </div>
      <div class="page"></div>
   </div>
</div>
<?php include_once('footer.php');?>
</body>
</html>
